package com.ojoin.trade.supplyloan_core.web.dao;

import com.ojoin.trade.common.exception.BusinessException;
import com.ojoin.trade.common.web.dao.BaseDao;
import com.ojoin.trade.supplyloan_core.web.domain.*;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 15-10-22
 * Time: 上午11:05
 * To change this template use File | Settings | File Templates.
 */

public interface TbSlLoanCreditDao extends BaseDao<TbSlLoanCreditLog> {

    public void insertTbSlLoanCredit( TbSlLoanCreditLog creditLogvo)throws BusinessException;

    public int updateTbSlLoanCredit(Map<String,Object> paramsmap)throws BusinessException;

    public List<TbSlLoanCreditLog> queryNotPayBackCreditLogByJoinid(int joinid,Pageable page)throws BusinessException;

    public List<TbSlLoanCreditLog> queryNotPayBackCreditLogByJoinidNotpage(int joinid)throws BusinessException;

     public List<TbSlLoanCreditLogVo> queryAllNotPayBackCreditLog(int userIdOfJoinOfCreditor )throws BusinessException;

    public List<TbSlStatusCreditLogVo>  queryCreditLogByStatus(int status,int userIdOfJoinOfCreditor, Pageable page)throws BusinessException;

    public TbSlLoanCreditLog queryCreditLogById(int id)throws BusinessException;

    public String querySumApplyLoanByJoinid(int id)throws BusinessException;


    public void caculateCreditFee()throws  BusinessException;

    public void caculateReneweFee()throws BusinessException;

    public void caculatePenalty()throws BusinessException;

    public List<SlLoanTodoTaskVO> queryToDoTask(Pageable page) throws BusinessException;

    public List<TbSlLoanCreditLogVo> queryPayBackCreditLogByCause(Map map, Pageable page)throws BusinessException;

    public List<TbSlLoanCreditLog> queryPaybackByJoinid(int joinid,Pageable page)throws BusinessException;

    public List<TbSlLoanCreditLog> queryApplyByJoinid(int joinid,Pageable page)throws BusinessException;

    public String selectCreditLoanCountByJoinid(int joinuserid) throws BusinessException;

    public String selectNotcompleteCreditLoanByJoinid(int joinuserid) throws BusinessException;
    
    public List<TbSlLoanCreditLog> queryCreditByIdList(List<Integer> list)throws BusinessException;

    public void cancelCredit()throws BusinessException;

    public List<TbSlLoanCreditLog> queryCreditByJoinid(int joinid,Pageable page)throws BusinessException;

    public void batchUpdateFile(List<Integer> idlist,String material)throws BusinessException;

    public void batchUpateFileByProcessid(Integer processid,String material)throws BusinessException;

    public List<TbSlNotPayBackCredit> queryCreditNotPayBack(int userIdOfIPayNowOfDebtor,Pageable page)throws BusinessException;

    public void updateBatchCancel(List<Integer> list)throws BusinessException;
    
    public void lockById(int id)throws BusinessException;

    public List<TbSlLoanCreditLogForFront> queryTbSlLoanCreditLogForFront(int joinid)throws BusinessException;

    public void lockTable()throws BusinessException;

    public List<TbSlNotPayBackCredit> queryCreditNotPayBackForSl(int userIdOfIPayNowOfDebtor)throws BusinessException;

    public List<TbSlLoanCreditLog> queryNotPayBack()throws BusinessException;

    public void updateTbSlCreditvo(TbSlLoanCreditLog logvo)throws BusinessException;

    public void cancelForPausedPlatform(Integer idOfPlatform)throws BusinessException;

    public List<TbSlLoanCreditLog> queryWillExpire(Integer userIdOfJoinOfDebtor,String curdate,Pageable page)throws BusinessException;

    public List<TbSlStatusCreditLogVo> queryRenewedCredit(Integer userIdOfJoinOfCreditor,Integer userIdOfJoinOfDebtor,Integer idOfPlatform,String begintime,String endtime,Pageable page)throws BusinessException;

    public List<TbSlLoanCreditLogVo> queryCreditForFloat(Map<String,Object> parammap,Pageable page)throws BusinessException;

    public List<TbSlCreditLogForExcelVO> queryCreditForExcel(int joinid)throws BusinessException;

    public List<TbSlLoanCreditLog>  queryNotPaybackByPlatform(int idofplatform)throws BusinessException;

    public TbSlStatusCreditLogVo queryStatusCreditLogVo(int id)throws BusinessException;

    public List<TbSlLoanCreditLog> queryCodeById(List<Integer> idlist)throws BusinessException;

    public List<TbSlLoanCreditLog> queryTsById(List<Integer> idlist)throws BusinessException;

    public  TbSlStatusCreditLogVo queryInfoById(Integer id)throws BusinessException;

    public void updateCreditLogForBatch(Map<String,Object>map)throws BusinessException;

    public void updateForCancelCredit(Integer processid)throws BusinessException;

    public List<TbSlStatusCreditLogVo> queryCreditByProcessid(Integer processid)throws BusinessException;

    public List<TbSlLoanCreditLogVo> queryNeedMessage()throws BusinessException;

    public List<TbSlLoanCreditLogVo> queryWillExpireCreditForOperator(Pageable pageable)throws BusinessException;

    public List<SLLoanBillBaseInfoVo> queryLoanBillBaseInfoByTime(String begintime,String endtime,Integer userIdOfJoinOfDebtor,Integer userIdOfJoinOfCreditor,Pageable pageable)throws BusinessException;

    public List<SlLoanBillDetailVo> queryLoanBillDetailVo(String begintime,String endtime,Integer userIdOfJoinOfDebtor)throws BusinessException;

    public SLLoanBillVo querySlLoanBillvo(String begintime,String endtime,Integer userIdOfJoinOfDebtor,Integer userIdOfJoinOfCreditor)throws BusinessException;
}